EOMONTH
Returns the serial number of the last day of the month before or after the specified number of months.
Syntax
expression.EOMONTH(arg1, arg2);
expression
- A variable that represents a ApiWorksheetFunction class.
Parameters
Name | Required/Optional | Data type | Default | Description |
---|---|---|---|---|
arg1 | Required | ApiRange | ApiName | number |
arg2 | Required | ApiRange | ApiName | number |
Returns
number
Example
const oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
var ans = oFunction.EOMONTH("3/16/2018", 10);
oWorksheet.GetRange("C1").SetValue(ans);